package com.wn.sk.product.core.service;

import com.wn.common.api.Result;
import com.wn.common.api.order.dto.OrderPayDto;
import com.wn.sk.product.core.entity.PromotionSeckill;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wn.sk.product.core.vo.PaymentVo;

/**
 * <p>
 * 秒杀活动表 服务类
 * </p>
 *
 * @author yellow docker
 * @since 2022-09-02
 */
public interface IPromotionSeckillService extends IService<PromotionSeckill> {

    /**
     * 生成订单
     * @param promotionId
     * @param userId
     * @return
     */
    Result submitOrder(Integer promotionId, String userId);

    /**
     * 确认订单的业务
     * @param orderPayDto
     * @param userId
     * @return
     */
    PaymentVo confirmOrder(OrderPayDto orderPayDto, String userId);

    /**
     * 进行付款操作
     * @param orderPayDto
     * @return
     */
    Integer payOrder(OrderPayDto orderPayDto);
}
